<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<% String path = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工信息查询</title>
<script type="text/javascript"	src="<%=path%>/common/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
	var path = '<%=path%>';
	
</script>
<!-- 引入reset.css(通用的格式化样式文件) -->
<link rel="stylesheet" type="text/css" href="<%=path %>/css/reset.css">
<!-- 引入控制当前页面的样式文件 -->
<link rel="stylesheet" type="text/css" href="<%=path %>/css/listUser.css">
</head>
<body>

	<table>
		<!-- 表头 -->
		<thead>
			<tr>
				<td>行号</td>
				<td>姓名</td>
				<td>用户ID</td>
				<td>职位</td>
				<td>登陆账户</td>
				<td>性别</td>
				<td>入职日期</td>
				<td>离职日期</td>
				<td>身份证号码</td>
				<td>年龄</td>
				<td>操作</td>
			</tr>
		</thead>
		<!-- 身体 -->
		<tbody>	
		
			<c:forEach items="${listUser}" var="user" varStatus="status">
				<tr <c:if test="${status.index % 2 == 0}">class="one"</c:if>
					<c:if test="${status.index % 2 != 0}">class="two"</c:if>>
					<td>${status.index + 1 }</td>
					<td>${user.name}</td>
					<td>${user.id}</td>
					<td style="background-color:${user.userPosition == '店长' ? 'blue' : 'green'}">${user.userPosition}</td>
					<td>${user.userName }</td>
					<td style="background-color:${user.userSex == '男' ? 'blue' : 'green'}">${user.userSex }</td>
					<td>${user.userHiredate }</td>
					<td>${user.userLeavedate}</td>
					<td>${user.userIdCard}</td>
					<td>${user.userAge }</td>
					<td><a href="<%=path %>/userServlet?method=selectUserOne&id=${user.id }">修改</a>
					<a href="<%=path %>/userServlet?method=deleteUserOne&id=${user.id }">离职</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>

	</table>
</body>
</html>